﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace mamnontuoitho7.AppCode
{
    public static class ConstantClass
    {

        //Error page of admin
        public const String _errorAdminPage = "AdminError.aspx";

        //Default avatar for kid
        public const String _kidDefaultAvatar = "icon-avatar-kid.png";

        //Default avatar for all memeber (Teacher, parents,...)
        public const String _memberDefaultAvatar = "icon-avatar.png";

        //
        public const String _errorLoginPage = "../module/Home.aspx";

        public const String _errorPage = "../module/ErrorPage.aspx";

        //Paging config

        public const int _pageStepArticle = 10;
        public const int _barStepArticle = 5;

        public const int _pageStepComment = 10;
        public const int _barStepComment = 5;

        public const int _pageStepParent = 15;
        public const int _barStepParent = 5;

        public const int _pageStepAlbum = 12;
        public const int _barStepAlbum = 5;

        public const int _pageStepConversation = 20;// cũng dùng cho notice
        public const int _barStepConversation = 5;

        public const int _pageStepMessage = 15;// trong kênh đối thoại giữa giáo viên và phu huynh
        public const int _barStepMessage = 5;

        public const int _pageStepWall = 15;// trong wall cua kid
        public const int _barStepWall = 5;

        public const int _pageStepHeal = 20;// trong heal info cua kid
        public const int _barStepHeal = 5;

        //Password default when insert new parent or teacher
        public const String _passwordDefault = "mamnontuoitho7";

        #region Article_Type_Has_One_Article

        public const String _SoDoToChuc = "18";
        public const String _NhanSu = "19";
        public const String _ThanhTich = "20";

        //public const String _SoDoToChuc = "16";
        //public const String _NhanSu = "17";
        //public const String _ThanhTich = "18";

        #endregion

        #region CookieName

        public const String cooTeacherList_ddlStatus = "TeacherList_ddlStatus";
        public const String cooAdminList_ddlStatus = "ParentList_ddlStatus";
        public const String cooKidList_ddlStatus = "KidList_ddlStatus";
        

        //Cookie name of search string in ParentList
        public const String cooParentList_memSearch = "ParentList_memSearch";

        

        #endregion

        #region Permission

        //All Admin 
        public const String adminRoleList = "1,2,5,6,7,";

        //Manage Article
        public const String permissionArticle = "1,2,5,7,";

        //Manage Information
        public const String permissionInfo = "1,2,6,7,";

        //Manage Article and Information
        public const String permissionTotal = "1,2,7,";

        //Manage Article, Infomation and AdminList
        public const String permissionPrincipal = "1,2,";

        //Manage All
        public const String permissionAdmin = "1,";

        #endregion

        #region RegularExpresion
        // full name in contact
        // public const String testFullNameRegular = @"^([a-zA-Z])([\s]?[a-zA-Z]+){2,50}$";

        //Test Member abcde_01.11
        public const String testMemberNameRegular_1 = @"^([a-zA-Z])([_\.]?[a-zA-Z0-9]+){5,19}$";

        // Test Email
        public const String testEmailRegular_1 = @"^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$";

        // ##### or +##.#### or ###.####.###### or +###.##### or ## ## ##.##.## or (##) ##.###.##
        public const String testPhoneRegular_1 = @"^([\+]{1})?([\(]([0-9]){1,}[\)][\s]?)?([0-9]([\s\.]{1}[0-9])?)+$";

        public const String testNameRegular_1 = @"^[a-zA-Z\s]+$";

        //  dd/MM/YYY or d/M/yyyy
        public const String testDate_1 = @"^(((0?[1-9]|[12]\d|3[01])\/(0?[13578]|1[02])\/((1[6-9]|[2-9]\d)\d{2}))|((0?[1-9]|[12]\d|30)\/(0?[13456789]|1[012])\/((1[6-9]|[2-9]\d)\d{2}))|((0?[1-9]|1\d|2[0-8])\/0?2\/((1[6-9]|[2-9]\d)\d{2}))|(29\/0?2\/((1[6-9]|[2-9]\d)(0?[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$";

        // Float number
        public const String testFloatNumber = @"^([\d]+)([\.][\d]+)?$";

        #endregion

        #region SQLErrorExceptionNumber

        public const int duplicateKey = 2627;

        #endregion

        public const String _tableMENU = "<div style='width:685px; margin:0 auto;'>"+
                                            "<p style='text-align: center;'>"+
		                                        "<span style='font-size: 20px;color: rgb(255, 0, 0); font-weight: 600;'>KẾ HOẠCH THỰC ĐƠN</span></p>"+
	                                        "<p style='text-align: center;'>"+
		                                        "<span style='color: rgb(0, 0, 102);font-size: 16px;'>TUẦN LỄ TỪ: ngày/tháng/năm ĐẾN: ngày/tháng/năm.</span></p>"+
                                            "<table style='width:100%; text-align:center;border:1px solid;' border='1' cellpadding='0' cellspacing='0'>"+
                                                "<tr>"+
                                                    "<th rowspan='2' style='padding:3px;'><span style='color: rgb(255, 0, 0);'>Ngày</span></th>" +
                                                    "<th rowspan='2' style='padding:3px;'><span style='color: rgb(0, 204, 255);'>Sáng</span></th>" +
                                                    "<th colspan='3' style='padding:3px;'><span style='color: rgb(0, 204, 255);'>Trưa</span></th>" +
                                                    "<th rowspan='2' style='padding:3px;'><span style='color: rgb(0, 204, 255);'>Xế</span></th>" +
                                                    "<th rowspan='2' style='padding:3px;'><span style='color: rgb(255, 0, 0);'>Bồi dưỡng trẻ SDD-Nhà trẻ khối 3T</span></th>" +
                                                "</tr>"+
                                                "<tr>"+
                                                    "<th style='padding:3px;'><span style='color: rgb(0, 153, 0);'>Món mặn</span></th>" +
                                                    "<th style='padding:3px;'><span style='color: rgb(0, 153, 0);'>Món canh</span></th>" +
                                                    "<th style='padding:3px;'><span style='color: rgb(0, 153, 0);'>Tráng miệng</span></th>" +
                                                "</tr>"+
                                                "<tr>"+
                                                    "<td style='word-wrap:break-word; padding:3px 3px 5px; vertical-align:top; line-height:17px;'>Thứ 2<br />ng/th</td>"+
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>"+
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>"+
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>"+
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>"+
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>"+
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>"+
                                                "</tr>"+
                                                "<tr>" +
                                                    "<td style='word-wrap:break-word; padding:3px 3px 5px; vertical-align:top; line-height:17px;'>Thứ 3<br />ng/th</td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                "</tr>" +
                                                "<tr>" +
                                                    "<td style='word-wrap:break-word; padding:3px 3px 5px; vertical-align:top; line-height:17px;'>Thứ 4<br />ng/th</td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                "</tr>" +
                                                "<tr>" +
                                                    "<td style='word-wrap:break-word; padding:3px 3px 5px; vertical-align:top; line-height:17px;'>Thứ 5<br />ng/th</td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                "</tr>" +
                                                "<tr>" +
                                                    "<td style='word-wrap:break-word; padding:3px 3px 5px; vertical-align:top; line-height:17px;'>Thứ 6<br />ng/th</td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                    "<td style='text-align:left; width:94px; word-wrap:break-word; padding:3px 3px 5px; line-height:17px; vertical-align:top;'></td>" +
                                                "</tr>" +
                                            "</table>"+
                                          "</div>";

    }
}